//
//  e7percent.h
//  e7engine
//
//  Created by cc on 12-2-28.
//  Copyright (c) 2012年 cc. All rights reserved.
//

#ifndef e7engine_e7percent_h
#define e7engine_e7percent_h

#include "e7utilitydefine.h"

#include "e7singleton.h"

namespace e7engine {

    class CE7Percent
    {
    public:
        CE7Percent() ;
        virtual ~CE7Percent() ;
        
        bool    InitPercent(int percent, int max, bool israndom = false) ;
        int     GetValue() ;

    private:
        void    Reset() ;
        
    private:
        bool    m_bIsRandom ;
        int*    m_pValues ;
        int     m_nIndex ;
        int     m_nPercent ;
        int     m_nMax ;
    } ;

}

#endif














